Skip to contentSkip to conversation

mesa-vdpau-drivers: breaks vdpau for mpeg2video

Bug 98914 [email protected] 1 participant 14 messages Nov 30, 2016 – Jan 3, 2017

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=98914

Bug ID: 98914
Summary: mesa-vdpau-drivers: breaks vdpau for mpeg2video
Product: Mesa
Version: 13.0
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 128286
--> https://bugs.freedesktop.org/attachment.cgi?id=128286&action=edit
X log file

On my AMD CPU/AMD GPU hybrid HP Pavilion notebook under X with radeon video driver the vdpau hardware video output for the mpeg2video codec broke beginning with Mesa 13.0. Such videos are totally scrambled on the screen now. Codec h264 is still working.
This is a debian testing/sid system with custom kernel 4.8.11.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #1 from Jörg-Volker Peetz <[email protected]> --- Created attachment 128287
--> https://bugs.freedesktop.org/attachment.cgi?id=128287&action=edit
vdpauinfo output

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #2 from Jörg-Volker Peetz <[email protected]> --- Created attachment 128288
--> https://bugs.freedesktop.org/attachment.cgi?id=128288&action=edit
dmesg output

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #4 from Michel Dänzer <[email protected]> ---
Is it already broken with 13.0.0, or only with 13.0.1? If the latter, I'm afraid it might be due to
https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=9c297c5487bf5464f75ffd5e11ad6aaad92915a9
.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #5 from Jörg-Volker Peetz <[email protected]> --- Meanwhile, I've tried version 13.0.0-1 from the debian snapshot archive. It shows already the same regression for the vdpau hardware acceleration with mpeg2video codec.
I've also cloned the mesa git repository. I'll try to bisect in the next days.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Acked-by Jose Fonseca Reviewed-by Emil Velikov
#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #6 from Jörg-Volker Peetz <[email protected]> --- The bisection between mesa-13.0.0 and mesa-12.0.4 leads to

1fb4179f927442354f93dfc8494f0236e50af838 is the first bad commit commit 1fb4179f927442354f93dfc8494f0236e50af838

Author: Jan Vesely <[email protected]>
Date:   Thu Jun 9 23:01:46 2016 -0400

vl: Fix trivial sign compare warnings

v2: add whitepace fixes

[Emil Velikov: squash a few more whitespace issues]

Indeed, reverting just this commit on top of 13.0.0 makes the vdpau hardware video output for the mpeg2video codec work again with r600 on my HP Pavilion dv7.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #7 from Christian König <[email protected]> --- Good work, looks like this fix had some unintended side effects.

Please try the following:

Revert the change without creating a commit, e.g. run "git revert -n 1fb4179f927442354f93dfc8494f0236e50af838".

Then reset the changes to their not added state, e.g. run "git reset HEAD". This should give you the following list:

M       src/gallium/auxiliary/vl/vl_deint_filter.c
M       src/gallium/auxiliary/vl/vl_idct.c
M       src/gallium/auxiliary/vl/vl_matrix_filter.c
M       src/gallium/auxiliary/vl/vl_median_filter.c
M       src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
M       src/gallium/auxiliary/vl/vl_vlc.h
M       src/gallium/auxiliary/vl/vl_zscan.c

Now use git checkout on each file (e.g. "git checkout src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c") to figure out what change actually broke the decoding.

My best bet is vl_mpeg12_bitstream.c, but could as well be vl_idct.c, vl_zscan.c or vl_vlc.h.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #8 from Jörg-Volker Peetz <[email protected]> --- Thanks for caring and your git lesson.

The culprit is the change in src/gallium/auxiliary/vl/vl_zscan.c . I double-checked by starting from mesa-13.0.2 and just reverted the type change in that file back to "signed i;" which is enough to repair this regression.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #9 from Christian König <[email protected]> --- Yeah, the problem is on line 155 in that file.

Here "i" is used as signed and the calculation result can be negative.

Brave enough to create a patch for this or should I do that?

Thanks for the help and it's nice to know that this is still used.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #10 from Jörg-Volker Peetz <[email protected]> --- Please, go ahead and commit the patch.

I think there might be many computers which could and do use this hardware acceleration. The mpeg2video codec applies to DVD's for example. Although IMO, the choice of vdpau hardware support (also for AMD GPUs) by installing the right package (mesa-vdpau-drivers on debian) and the configuration of mpc or vlc is not obvious.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #11 from Christian König <[email protected]> --- Created attachment 128472
--> https://bugs.freedesktop.org/attachment.cgi?id=128472&action=edit
Possible fix

The reason I've wondered that somebody is still using this is that code is only used by very old hardware generation which don't have native MPEG2 support.

Anyway, please confirm that the attached patch fixes the problem and I will commit it.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

--- Comment #12 from Jörg-Volker Peetz <[email protected]> --- Thanks for the patch. I reviewed and tested it ok. The hardware accelerated mpeg2video codec works, e.g., with mpv.

So, my five years old notebook is "very" old :-(.
I did all testing with the integrated GPU (ATI Mobility Radeon HD 4200).

Quoted 1 line

From time to time I try the offloading to the discrete GPU (ATI Mobility Radeon

HD 5000 Series) with PRIME. But all too often it hard crashes this notebook.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98914

Christian König <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #13 from Christian König <[email protected]> --- Just pushed the patch after coming back from vacation.

Should eventually show up in stable releases as well.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel